﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using model;
using Bll;

public partial class ResShow : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null)
        {
            Response.Write("<script>alert('请先登录！');history.back();</script>");
        }
        if (Session["usergroup"].ToString() == "student")
        {
            Response.Write("<script>alert('您没有权限查看！');location.href='Resumel.aspx';</script>");
        }
        StudentBll sbll= new StudentBll();
        ResumeBll rbll = new ResumeBll();
        string sno =Request.Params["sno"];
        Student student = sbll.GetSingle(sno);
        Resume rs = rbll.GetSingle(sno);
        lblsno.Text = sno;
        lblsname.Text = student.Sname;
        lblssex.Text = student.Ssex;
        lblsmajor.Text = student.Smajor;
        DateTime dt=student.Sbirth;
        lblsbirth.Text = dt.Year.ToString() + "-" + dt.Month.ToString() + "-" + dt.Day.ToString();
        lblXueli.Text = rs.Xueli;
        lblHuji.Text = rs.Huji;
        lbleTele.Text = rs.Tele;
        lblMobile.Text = rs.Mobile;
        lblAddr.Text = rs.Addr;
        lblYixiang.Text = rs.Yixiang;
        lblRecord.Text = rs.Record;
        lblInter.Text = rs.Inter;
        lblIntro.Text = rs.Intro;
    }
}